cmake_minimum_required(VERSION 2.8)

set(POSTGRES_MAJOR_VERSION "@POSTGRES_MAJOR_VERSION@")
set(POSTGRES_MINOR_VERSION "@POSTGRES_MINOR_VERSION@")
set(POSTGRES_PATCH_VERSION "@POSTGRES_MINOR_VERSION@")
set(POSTGRES_VERSION "@POSTGRES_VERSION@")
set(PG_VERSION "9.6devel")
set(PG_VERSION_NUM 90600)

set(PGBINDIR "@PGBINDIR@")
set(PGSHAREDIR "@PGSHAREDIR@")
set(SYSCONFDIR "@SYSCONFDIR@")
set(INCLUDEDIR "@INCLUDEDIR@")
set(PKGINCLUDEDIR "@PKGINCLUDEDIR@")
set(INCLUDEDIRSERVER "@INCLUDEDIRSERVER@")
set(LIBDIR "@LIBDIR@")
set(PKGLIBDIR "@PKGLIBDIR@")
set(LOCALEDIR "@LOCALEDIR@")
set(DOCDIR "@DOCDIR@")
set(HTMLDIR "@HTMLDIR@")
set(MANDIR "@MANDIR@")


set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
set(CMAKE_MACOSX_RPATH 1)

set(CMAKE_CXX_FLAGS "@CMAKE_CXX_FLAGS@")
set(CMAKE_C_FLAGS "@CMAKE_C_FLAGS@")
set(CMAKE_SHARED_LINKER_FLAGS "@CMAKE_SHARED_LINKER_FLAGS@")
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "@CMAKE_SHARED_LIBRARY_SONAME_C_FLAG@")
set(CMAKE_SHARED_LINKER_FLAGS "@CMAKE_SHARED_LINKER_FLAGS@")

include_directories(${INCLUDEDIRSERVER})
link_directories(${LIBDIR})

if(WIN32)
	set(contrib_libs
		port
		pgcommon
	)
endif()

if(MSVC)
	set(contrib_libs
		${contrib_libs}
		postgres
	)
endif()
